package com.z.ssmdemo.service.impl;

import com.z.platform.controller.persistence.ConnectionFactory;
import com.z.platform.controller.persistence.orm.DaoFactory;
import com.z.ssmdemo.entity.UserEntity;
import com.z.ssmdemo.service.UserService;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Date;
import java.util.UUID;

public class UserServiceImpl implements UserService {
    @Override
    public String getUser(String nickName,String pazzword) {
        UserEntity userEntity = new UserEntity();
        userEntity.setNickName(nickName);
        userEntity.setName(nickName);
        userEntity.setPassWord(pazzword);
        userEntity.setId(UUID.randomUUID().toString());
        DaoFactory.getInstance().insert(userEntity);
        return "name";
    }
}
